package com.u1zz.zeus.module.iot.controller.admin.product.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.u1zz.zeus.framework.excel.core.annotations.DictFormat;
import com.u1zz.zeus.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 产品 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProductRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5816")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "所属品类", requiredMode = Schema.RequiredMode.REQUIRED, example = "20492")
    @ExcelProperty("所属品类")
    private Long categoryId;
    private String categoryName;

    @Schema(description = "产品标识", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("产品标识")
    private String productKey;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("产品名称")
    private String productName;

    @Schema(description = "消息协议")
    @ExcelProperty(value = "消息协议", converter = DictConvert.class)
    @DictFormat("iot_transport_protocol") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String messageProtocol;

    @Schema(description = "传输协议")
    @ExcelProperty(value = "传输协议", converter = DictConvert.class)
    @DictFormat("iot_transport_protocol") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String transportProtocol;

    @Schema(description = "设备类型", example = "1")
    @ExcelProperty(value = "设备类型", converter = DictConvert.class)
    @DictFormat("iot_device_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String deviceType;

    @Schema(description = "认证方式", example = "1")
    @ExcelProperty(value = "认证方式", converter = DictConvert.class)
    @DictFormat("iot_auth_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String authType;

    @Schema(description = "产品描述", example = "你猜")
    @ExcelProperty("产品描述")
    private String description;

    @Schema(description = "图片地址")
    @ExcelProperty("图片地址")
    private String icon;

    @Schema(description = "物模型")
    @ExcelProperty("物模型")
    private String metadata;

    @Schema(description = "发布状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "发布状态", converter = DictConvert.class)
    @DictFormat("iot_product_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String status;

    @Schema(description = "该产品下的设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "13985")
    @ExcelProperty("该产品下的设备数量")
    private Long deviceCount;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}